Optimal. Leaf size=152 \[ -\frac {4 A x}{a^4}+\frac {2 (332 A+3 C) \sin (c+d x)}{105 a^4 d}-\frac {(88 A-3 C) \sin (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac {4 A \sin (c+d x)}{a^4 d (1+\sec (c+d x))}-\frac {(A+C) \sin (c+d x)}{7 d (a+a \sec (c+d x))^4}-\frac {2 (6 A-C) \sin (c+d x)}{35 a d (a+a \sec (c+d x))^3} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.34, antiderivative size = 152, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {4170, 4105,
3872, 2717, 8} \begin {gather*} \frac {2 (332 A+3 C) \sin (c+d x)}{105 a^4 d}-\frac {(88 A-3 C) \sin (c+d x)}{105 a^4 d (\sec (c+d x)+1)^2}-\frac {4 A \sin (c+d x)}{a^4 d (\sec (c+d x)+1)}-\frac {4 A x}{a^4}-\frac {2 (6 A-C) \sin (c+d x)}{35 a d (a \sec (c+d x)+a)^3}-\frac {(A+C) \sin (c+d x)}{7 d (a \sec (c+d x)+a)^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2717
Rule 3872
Rule 4105
Rule 4170
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) \left (A+C \sec ^2(c+d x)\right )}{(a+a \sec (c+d x))^4} \, dx &=-\frac {(A+C) \sin (c+d x)}{7 d (a+a \sec (c+d x))^4}-\frac {\int \frac {\cos (c+d x) (-a (8 A+C)+a (4 A-3 C) \sec (c+d x))}{(a+a \sec (c+d x))^3} \, dx}{7 a^2}\\ &=-\frac {(A+C) \sin (c+d x)}{7 d (a+a \sec (c+d x))^4}-\frac {2 (6 A-C) \sin (c+d x)}{35 a d (a+a \sec (c+d x))^3}-\frac {\int \frac {\cos (c+d x) \left (-a^2 (52 A+3 C)+6 a^2 (6 A-C) \sec (c+d x)\right )}{(a+a \sec (c+d x))^2} \, dx}{35 a^4}\\ &=-\frac {(88 A-3 C) \sin (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac {(A+C) \sin (c+d x)}{7 d (a+a \sec (c+d x))^4}-\frac {2 (6 A-C) \sin (c+d x)}{35 a d (a+a \sec (c+d x))^3}-\frac {\int \frac {\cos (c+d x) \left (-2 a^3 (122 A+3 C)+2 a^3 (88 A-3 C) \sec (c+d x)\right )}{a+a \sec (c+d x)} \, dx}{105 a^6}\\ &=-\frac {(88 A-3 C) \sin (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac {(A+C) \sin (c+d x)}{7 d (a+a \sec (c+d x))^4}-\frac {2 (6 A-C) \sin (c+d x)}{35 a d (a+a \sec (c+d x))^3}-\frac {4 A \sin (c+d x)}{d \left (a^4+a^4 \sec (c+d x)\right )}-\frac {\int \cos (c+d x) \left (-2 a^4 (332 A+3 C)+420 a^4 A \sec (c+d x)\right ) \, dx}{105 a^8}\\ &=-\frac {(88 A-3 C) \sin (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac {(A+C) \sin (c+d x)}{7 d (a+a \sec (c+d x))^4}-\frac {2 (6 A-C) \sin (c+d x)}{35 a d (a+a \sec (c+d x))^3}-\frac {4 A \sin (c+d x)}{d \left (a^4+a^4 \sec (c+d x)\right )}-\frac {(4 A) \int 1 \, dx}{a^4}+\frac {(2 (332 A+3 C)) \int \cos (c+d x) \, dx}{105 a^4}\\ &=-\frac {4 A x}{a^4}+\frac {2 (332 A+3 C) \sin (c+d x)}{105 a^4 d}-\frac {(88 A-3 C) \sin (c+d x)}{105 a^4 d (1+\sec (c+d x))^2}-\frac {(A+C) \sin (c+d x)}{7 d (a+a \sec (c+d x))^4}-\frac {2 (6 A-C) \sin (c+d x)}{35 a d (a+a \sec (c+d x))^3}-\frac {4 A \sin (c+d x)}{d \left (a^4+a^4 \sec (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(371\) vs. \(2(152)=304\).
time = 1.28, size = 371, normalized size = 2.44 \begin {gather*} -\frac {\sec \left (\frac {c}{2}\right ) \sec ^7\left (\frac {1}{2} (c+d x)\right ) \left (29400 A d x \cos \left (\frac {d x}{2}\right )+29400 A d x \cos \left (c+\frac {d x}{2}\right )+17640 A d x \cos \left (c+\frac {3 d x}{2}\right )+17640 A d x \cos \left (2 c+\frac {3 d x}{2}\right )+5880 A d x \cos \left (2 c+\frac {5 d x}{2}\right )+5880 A d x \cos \left (3 c+\frac {5 d x}{2}\right )+840 A d x \cos \left (3 c+\frac {7 d x}{2}\right )+840 A d x \cos \left (4 c+\frac {7 d x}{2}\right )-60830 A \sin \left (\frac {d x}{2}\right )-2520 C \sin \left (\frac {d x}{2}\right )+46130 A \sin \left (c+\frac {d x}{2}\right )+2520 C \sin \left (c+\frac {d x}{2}\right )-46116 A \sin \left (c+\frac {3 d x}{2}\right )-1764 C \sin \left (c+\frac {3 d x}{2}\right )+18060 A \sin \left (2 c+\frac {3 d x}{2}\right )+1260 C \sin \left (2 c+\frac {3 d x}{2}\right )-19292 A \sin \left (2 c+\frac {5 d x}{2}\right )-588 C \sin \left (2 c+\frac {5 d x}{2}\right )+2100 A \sin \left (3 c+\frac {5 d x}{2}\right )+420 C \sin \left (3 c+\frac {5 d x}{2}\right )-3791 A \sin \left (3 c+\frac {7 d x}{2}\right )-144 C \sin \left (3 c+\frac {7 d x}{2}\right )-735 A \sin \left (4 c+\frac {7 d x}{2}\right )-105 A \sin \left (4 c+\frac {9 d x}{2}\right )-105 A \sin \left (5 c+\frac {9 d x}{2}\right )\right )}{26880 a^4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.62, size = 159, normalized size = 1.05
method | result | size |
derivativedivides | \(\frac {-\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{7}-\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{7}+\frac {7 A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}+\frac {3 C \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}-\frac {23 A \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-C \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+49 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-16 A \left (-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}+4 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{8 d \,a^{4}}\) | \(159\) |
default | \(\frac {-\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) A}{7}-\frac {\left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) C}{7}+\frac {7 A \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}+\frac {3 C \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5}-\frac {23 A \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-C \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+49 A \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+C \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-16 A \left (-\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}+4 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )\right )}{8 d \,a^{4}}\) | \(159\) |
norman | \(\frac {\frac {4 A x}{a}-\frac {4 A x \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a}-\frac {\left (A +C \right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{56 a d}+\frac {\left (7 A +3 C \right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{40 a d}-\frac {\left (65 A +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 a d}+\frac {\left (71 A +3 C \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 a d}-\frac {\left (79 A +9 C \right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{84 a d}+\frac {\left (119 A +C \right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{20 a d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a^{3}}\) | \(207\) |
risch | \(-\frac {4 A x}{a^{4}}-\frac {i A \,{\mathrm e}^{i \left (d x +c \right )}}{2 a^{4} d}+\frac {i A \,{\mathrm e}^{-i \left (d x +c \right )}}{2 a^{4} d}+\frac {2 i \left (1050 A \,{\mathrm e}^{6 i \left (d x +c \right )}+105 C \,{\mathrm e}^{6 i \left (d x +c \right )}+5250 A \,{\mathrm e}^{5 i \left (d x +c \right )}+315 C \,{\mathrm e}^{5 i \left (d x +c \right )}+11900 A \,{\mathrm e}^{4 i \left (d x +c \right )}+630 C \,{\mathrm e}^{4 i \left (d x +c \right )}+14840 A \,{\mathrm e}^{3 i \left (d x +c \right )}+630 C \,{\mathrm e}^{3 i \left (d x +c \right )}+10794 A \,{\mathrm e}^{2 i \left (d x +c \right )}+441 C \,{\mathrm e}^{2 i \left (d x +c \right )}+4298 \,{\mathrm e}^{i \left (d x +c \right )} A +147 C \,{\mathrm e}^{i \left (d x +c \right )}+764 A +36 C \right )}{105 d \,a^{4} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{7}}\) | \(220\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 246, normalized size = 1.62 \begin {gather*} \frac {A {\left (\frac {1680 \, \sin \left (d x + c\right )}{{\left (a^{4} + \frac {a^{4} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} + \frac {\frac {5145 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {805 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {147 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {15 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}}{a^{4}} - \frac {6720 \, \arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{4}}\right )} + \frac {3 \, C {\left (\frac {35 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {35 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {21 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac {5 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}\right )}}{a^{4}}}{840 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.50, size = 193, normalized size = 1.27 \begin {gather*} -\frac {420 \, A d x \cos \left (d x + c\right )^{4} + 1680 \, A d x \cos \left (d x + c\right )^{3} + 2520 \, A d x \cos \left (d x + c\right )^{2} + 1680 \, A d x \cos \left (d x + c\right ) + 420 \, A d x - {\left (105 \, A \cos \left (d x + c\right )^{4} + 4 \, {\left (296 \, A + 9 \, C\right )} \cos \left (d x + c\right )^{3} + {\left (2636 \, A + 39 \, C\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left (559 \, A + 6 \, C\right )} \cos \left (d x + c\right ) + 664 \, A + 6 \, C\right )} \sin \left (d x + c\right )}{105 \, {\left (a^{4} d \cos \left (d x + c\right )^{4} + 4 \, a^{4} d \cos \left (d x + c\right )^{3} + 6 \, a^{4} d \cos \left (d x + c\right )^{2} + 4 \, a^{4} d \cos \left (d x + c\right ) + a^{4} d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {A \cos {\left (c + d x \right )}}{\sec ^{4}{\left (c + d x \right )} + 4 \sec ^{3}{\left (c + d x \right )} + 6 \sec ^{2}{\left (c + d x \right )} + 4 \sec {\left (c + d x \right )} + 1}\, dx + \int \frac {C \cos {\left (c + d x \right )} \sec ^{2}{\left (c + d x \right )}}{\sec ^{4}{\left (c + d x \right )} + 4 \sec ^{3}{\left (c + d x \right )} + 6 \sec ^{2}{\left (c + d x \right )} + 4 \sec {\left (c + d x \right )} + 1}\, dx}{a^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.49, size = 184, normalized size = 1.21 \begin {gather*} -\frac {\frac {3360 \, {\left (d x + c\right )} A}{a^{4}} - \frac {1680 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )} a^{4}} + \frac {15 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} + 15 \, C a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{7} - 147 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 63 \, C a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 805 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 105 \, C a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 5145 \, A a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 105 \, C a^{24} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{28}}}{840 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.75, size = 192, normalized size = 1.26 \begin {gather*} \frac {2\,A\,\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{a^4\,d}-\frac {\left (-\frac {764\,A\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{105}-\frac {12\,C\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{35}\right )\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+\left (\frac {143\,A\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{105}+\frac {23\,C\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{70}\right )\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\left (-\frac {8\,A\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{35}-\frac {9\,C\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{70}\right )\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {A\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{56}+\frac {C\,\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{56}}{a^4\,d\,{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7}-\frac {4\,A\,x}{a^4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________